<script setup>
import { RouterLink } from 'vue-router'
</script>

<template>
  <div class="home-page">
    <!-- 首页标题区域 -->
    <section class="hero">
      <div class="hero-content">
        <h1 class="hero-title">欢迎来到我们的商城</h1>
        <p class="hero-subtitle">
          提供优质的商品和服务，满足您的购物需求
        </p>
        <div class="hero-actions">
          <RouterLink to="/login" class="btn-primary">
            登录
          </RouterLink>
          <RouterLink to="/mall" class="btn-secondary">
            前往商城
          </RouterLink>
        </div>
      </div>
    </section>

    <!-- 简介区域 -->
    <section class="intro">
      <div class="container">
        <h2>关于我们</h2>
        <p>我们致力于为您提供高品质的商品和便捷的购物体验。无论您是寻找电子产品、时尚服饰还是家居用品，我们都能满足您的需求。</p>
      </div>
    </section>
  </div>
</template>

<style scoped>
/* 首页容器 */
.home-page {
  min-height: 100vh;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #333;
  background-color: #f8f9fa;
}

/* 英雄区域 */
.hero {
  position: relative;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
  padding: 20px;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* 按钮样式 */
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background-color: white;
  color: #667eea;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  background-color: transparent;
  color: white;
  border: 2px solid white;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* 简介区域 */
.intro {
  padding: 60px 0;
  background-color: white;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.intro h2 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  color: #2c3e50;
}

.intro p {
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
  color: #7f8c8d;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .intro h2 {
    font-size: 1.8rem;
  }
  
  .intro p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .hero {
    height: 70vh;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }
  
  .btn-primary, .btn-secondary {
    width: 100%;
  }
}
</style>
